﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GJLib;
using Newtonsoft.Json;
using System.IO;

namespace EightWordForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

     

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            BigSixNineHelper bh = new BigSixNineHelper();
            DateTime dt=new DateTime(2013,5,13,17,0,0);
            var o=bh.preparePan(dt, "乙卯", true);
            String content=JsonConvert.SerializeObject(o,Formatting.Indented);
            File.WriteAllText(@"d:\2.txt", content, Encoding.UTF8);
            String fileName = @"D:\project\五術\json\JsonForm\EightWordForm\HTMLPage2.htm";
            String src=File.ReadAllText(fileName, Encoding.UTF8);
            src=src.Replace("$panti$", content);
            File.WriteAllText(@"d:\\demo.html",src,Encoding.UTF8);
            


        }
    }
}
